package tex.base;

import java.util.Vector;

public class Text implements Element {
	private final Vector<String> text;

	public Text() {
		text = new Vector<String>();
	}

	/**
	 * @return the text
	 */
	public Vector<String> getText() {
		return text;
	}
	
	@Override
	public String toString() {
		return "(" + text.toString() + ")" ;
	}

	@Override
	public void generateDocument(StringBuffer buffer, Tex tex) {
		for (String s : text) {
			buffer.append(s + " ");
		}
		buffer.append("\n");
	}
}
